Imports DAL
Imports MyClasses
Imports System.Data.SqlClient
Public Class DProduct

    'Public Shared Function Insert_Pdt(ByVal objCpdt As CProduct) As Boolean
    '    Dim strQuery As String
    '    Dim param(18) As SqlParameter

    '    strQuery = "insert into mproduct (prdct_seqID,prdct_ID,prdct_name,prdct_code,prdct_GenricName," & _
    '               "prdct_Desc,prdct_MFGcode,prdct_CatCode,prdct_Packing,prdct_Unit, prdct_LID," & _
    '               "Min_Level, Max_Level, Reorder_Level, Reorder_Qty, status, LU, LD, LT)" & _
    '               "values (@prdct_seqID, @prdct_ID, @prdct_name, @prdct_code, @prdct_GenericName," & _
    '               "@prdct_Desc, @prdct_MFGcode, @prdct_CatCode, @prdct_Packing, @prdct_Unit," & _
    '               "@prdct_LID, @Min_Level, @Max_Level, @Reorder_Level, @Reorder_Qnty, @status, @LU, @LD, @LT)"

    '    param(0) = New SqlParameter("@prdct_seqID", objCpdt.Prdct_SeqID)
    '    param(1) = New SqlParameter("@prdct_ID", objCpdt.Prdct_ID)
    '    param(2) = New SqlParameter("@prdct_name", objCpdt.Prdct_Name)
    '    param(3) = New SqlParameter("@prdct_code", objCpdt.Prdct_code)
    '    param(4) = New SqlParameter("@prdct_GenericName", objCpdt.prdct_GenericName)
    '    param(5) = New SqlParameter("@prdct_Desc", objCpdt.Prdct_Description)
    '    param(6) = New SqlParameter("@prdct_MFGcode", objCpdt.Prdct_MFGname)
    '    param(7) = New SqlParameter("@prdct_CatCode", objCpdt.Prdct_Category)
    '    param(8) = New SqlParameter("@prdct_Packing", objCpdt.Prdct_Packing)
    '    param(9) = New SqlParameter("@prdct_Unit", objCpdt.Prdct_Unit)
    '    param(10) = New SqlParameter("@prdct_LID", objCpdt.Prdct_Location)
    '    param(11) = New SqlParameter("@Min_Level", objCpdt.Prdct_Min)
    '    param(12) = New SqlParameter("@Max_Level", objCpdt.Prdct_Max)
    '    param(13) = New SqlParameter("@Reorder_Level", objCpdt.Prdct_ReorderLvl)
    '    param(14) = New SqlParameter("@Reorder_Qnty", objCpdt.Prdct_ReorderQnty)
    '    param(15) = New SqlParameter("@status", objCpdt.Prdct_Status)
    '    param(16) = New SqlParameter("@LU", objCpdt.Prdct_LastUser)
    '    param(17) = New SqlParameter("@LD", objCpdt.Prdct_LastDate)
    '    param(18) = New SqlParameter("@LT", objCpdt.Prdct_LastTime)

    '    Return DbHelper.ExecuteNonQuery(strQuery, param)

    'End Function
    'Public Shared Function Update_Pdt(ByVal objCpdt As CProduct) As Boolean
    '    Dim strQuery As String
    '    Dim param(18) As SqlParameter

    '    strQuery = "update mproduct set prdct_ID= @prdct_ID ,prdct_name= @prdct_name ,prdct_code= @prdct_code," & _
    '               "prdct_GenricName= @prdct_GenericName, prdct_Desc= @prdct_Desc, prdct_MFGcode= @prdct_MFGcode," & _
    '               "prdct_CatCode= @prdct_CatCode, prdct_Packing= @prdct_Packing, prdct_Unit= @prdct_Unit, prdct_LID= @prdct_LID," & _
    '               "Min_Level= @Min_Level, Max_Level= @Max_Level, Reorder_Level= @Reorder_Level," & _
    '               "Reorder_Qty= @Reorder_Qnty, status= @status, LU= @LU, LD= @LD, LT= @LT where prdct_seqID= @prdct_seqID"

    '    param(0) = New SqlParameter("@prdct_ID", objCpdt.Prdct_ID)
    '    param(1) = New SqlParameter("@prdct_name", objCpdt.Prdct_Name)
    '    param(2) = New SqlParameter("@prdct_code", objCpdt.Prdct_code)
    '    param(3) = New SqlParameter("@prdct_GenericName", objCpdt.Prdct_GenericName)
    '    param(4) = New SqlParameter("@prdct_Desc", objCpdt.Prdct_Description)
    '    param(5) = New SqlParameter("@prdct_MFGcode", objCpdt.Prdct_MFGname)
    '    param(6) = New SqlParameter("@prdct_CatCode", objCpdt.Prdct_Category)
    '    param(7) = New SqlParameter("@prdct_Packing", objCpdt.Prdct_Packing)
    '    param(8) = New SqlParameter("@prdct_Unit", objCpdt.Prdct_Unit)
    '    param(9) = New SqlParameter("@prdct_LID", objCpdt.Prdct_Location)
    '    param(10) = New SqlParameter("@Min_Level", objCpdt.Prdct_Min)
    '    param(11) = New SqlParameter("@Max_Level", objCpdt.Prdct_Max)
    '    param(12) = New SqlParameter("@Reorder_Level", objCpdt.Prdct_ReorderLvl)
    '    param(13) = New SqlParameter("@Reorder_Qnty", objCpdt.Prdct_ReorderQnty)
    '    param(14) = New SqlParameter("@status", objCpdt.Prdct_Status)
    '    param(15) = New SqlParameter("@LU", objCpdt.Prdct_LastUser)
    '    param(16) = New SqlParameter("@LD", objCpdt.Prdct_LastDate)
    '    param(17) = New SqlParameter("@LT", objCpdt.Prdct_LastTime)
    '    param(18) = New SqlParameter("@prdct_seqID", objCpdt.Prdct_SeqID)
    '    Return DbHelper.ExecuteNonQuery(strQuery, param)

    'End Function
    'Public Shared Function delete_pdt(ByVal objcpdt As Object) As Boolean
    '    Dim strQuery As String
    '    Dim param(0) As SqlParameter
    '    strQuery = "update mproduct set status = 'X' where prdct_seqID= @prdct_seqID"
    '    param(0) = New SqlParameter("@prdct_seqID", objcpdt.Prdct_SeqID)
    '    Return DbHelper.ExecuteNonQuery(strQuery, param)
    'End Function

    'Public Shared Function fill_pdtgrid() As DataSet
    '    Dim strFillgrd As String
    '    strFillgrd = "select * from mproduct where status = 'A'"
    '    Return DbHelper.ExecuteDataSet(strFillgrd)
    'End Function


End Class
